/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.yogi.webframework.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Yogi
 */
@Embeddable
public class ProductImagesPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ANGLE")
    private int angle;
    @Basic(optional = false)
    @Column(name = "T_PRODUCT_ID")
    private int tProductId;

    public ProductImagesPK() {
    }

    public ProductImagesPK(int angle, int tProductId) {
        this.angle = angle;
        this.tProductId = tProductId;
    }

    public int getAngle() {
        return angle;
    }

    public void setAngle(int angle) {
        this.angle = angle;
    }

    public int getTProductId() {
        return tProductId;
    }

    public void setTProductId(int tProductId) {
        this.tProductId = tProductId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) angle;
        hash += (int) tProductId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ProductImagesPK)) {
            return false;
        }
        ProductImagesPK other = (ProductImagesPK) object;
        if (this.angle != other.angle) {
            return false;
        }
        if (this.tProductId != other.tProductId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.yogi.webframework.model.ProductImagesPK[angle=" + angle + ", tProductId=" + tProductId + "]";
    }

}
